1. Field of the Invention
The present invention relates to an image processor.
2. Description of the Background Art
Microsoft Corporation has recently proposed HD Photo (or JPEG XR) as a still image file format that offers higher image quality than JPEG while requiring more simple circuit configuration and computation than JPEG 2000.
An encoder for HD Photo includes a color conversion unit, a pre-filter, a frequency transform unit, a quantization unit, a prediction unit, a sorting unit, and an encoding unit.
The frequency transform unit performs predetermined frequency transform (PCT) on an inputted pixel signal, so as to output frequency data (coefficient data) of highpass (hereinafter, “HP”), lowpass (hereinafter, “LP”), and direct current (hereinafter, “DC”) components. One macroblock having 16 pixels in column×16 pixels in row includes 240 sets (15 sets×16 blocks) of frequency data of HP component, 15 sets of frequency data of LP component, and 1 set of frequency data of DC component for each of luminance Y, chrominance U, and chrominance V.
The quantization unit discards lower (or less significant) data equivalent to the number of digits defined by a quantization coefficient in the frequency data of each component inputted from the frequency transform unit, so as to output the frequency data after quantization (HP, LP, and DC components).
The prediction unit performs predetermined prediction on the frequency data inputted from the quantization unit, so as to output the frequency data after prediction (that is, difference data from a prediction value).
The sorting unit sorts (herein after, “Adaptive Scan”) 15 sets of frequency data of LP component among the frequency data inputted from the prediction unit. The sorting unit also performs Adaptive Scan on 15 sets of frequency data of HP component among frequency data inputted from the prediction unit on a block-by-block basis. Specifically, the sorting unit refers to a table indicating frequency of appearance of nonzero data, and sorts the frequency data into the order of decreasing frequency of appearance of nonzero data. In HD Photo, there are three tables in total for the sorting unit to refer to in performing Adaptive Scan, one for LP component, one for HP component when orientation of prediction is a horizontal direction, and the other for HP component when orientation of prediction is a vertical direction.
The encoding unit splits the frequency data of each component inputted from the sorting unit into upper (or more significant) data (Normal Data) in an upper digit range and lower data (Flex Bits) in a lower digit range. Then the encoding unit performs entropy coding on the Normal Data of each component, and output the same, while outputting the Flex Bits of each component without entropy coding.
A decoder for HD Photo includes a color inverse conversion unit, a post-filter, a frequency inverse transform unit, a dequantization unit, an inverse prediction unit, a sorting unit, and a decoding unit. The decoder performs processing in reverse order to processing by the encoder, so as to decompress pixel signals from the coded frequency data.
The details of HD Photo are disclosed in, for example, “HD Photo—Photographic Still Image File Format”, [online], 7 Nov. 2006, Microsoft Corporation, [searched in the Internet on 10 Oct. 2007], <URL: http://www.microsoft.com/whdc/xps/hdphotodpk.mspx>. The details of JPEG XR are disclosed in, for example, “Coding of Still Pictures—JBIG JPEG”, [online], 19 Dec. 2007, ISO/IEC JTC 1/SC 29/WG1 N 4392, [searched in the Internet on 4 Mar. 2008], <URL: http://www.itscj.ipsj.or.jp/sc29/open/29view/29n9026t.doc>or “Coding of Still Pictures—JBIG JPEG”, [online], 14 Sep. 2008, ISO/IEC JTC 1/SC 29/WG1 N 4739, [searched in the Internet on 17 Sep. 2008], <URL: http://www.itscj.ipsj.or.jp/sc29/open/29view/29n9749t.doc>.
The sorting unit refers to a table common to the three color channels, luminance Y, chrominance U, and chrominance V. When processing HP component in YUV444 color space, the sorting unit first performs Adaptive Scan on 16 blocks for luminance Y in sequence while updating a table for each block, secondly performs Adaptive Scan on 16 blocks for chrominance U in sequence while updating a table for each block, and then performs Adaptive Scan on 16 blocks for chrominance V in sequence while updating a table for each block. Thus the sorting unit needs to wait for processing for luminance Y to be completed in order to process chrominance U, and wait for processing for chrominance U to be completed in order to process chrominance V. Consequently, processing time required for sorting is prolonged.